package me.zhengjie.utils;

/**
 * Short工具类
 */
public class ShortUtil {

    public static Short valueOf(String text) {
        return valueOf(text, null);
    }

    public static Short valueOf(String text, Short defaultValue) {
        if (text == null || text.isEmpty()) {
            return defaultValue;
        }
        try {
			return Short.valueOf(text);
		} catch (NumberFormatException e) {
			return defaultValue;
		}
    }
}
